
.autocomplete-suggestions {
    border: var(--dropdown-border-width) solid var(--dropdown-border);
    background-color: var(--dropdown-bg);
    color: var(--dropdown-link-color);
    cursor: default;
    overflow: auto;
    padding: 5px 0;

    .autocomplete-suggestion.autocomplete-selected {
        background-color: var(--dropdown-link-hover-bg) !important;
        color: var(--dropdown-link-hover-color) !important;
    }

    strong {
        font-weight: normal;
        color: @brand-primary;
    }

    .autocomplete-suggestion {
        padding: 4px 10px;
        white-space: nowrap;
        overflow: hidden;
    }
}

.popover,
.dropdown-menu,
.selectize-dropdown,
.selectize-dropdown.form-control,
.autocomplete-suggestions,
.ui-timepicker-wrapper {
    border: var(--dropdown-border-width) solid var(--dropdown-border);
    box-shadow: var(--dropdown-box-shadow);
    border-radius: var(--dropdown-border-radius);
    border-width: var(--dropdown-border-width);
}

.popover {
    background-color: var(--dropdown-bg);

    &.bottom > .arrow {
        border-bottom-color: var(--dropdown-border);
    }
    &.top > .arrow {
        border-top-color: var(--dropdown-border);
    }
    &.left > .arrow {
        border-left-color: var(--dropdown-border);
    }
    &.right > .arrow {
        border-right-color: var(--dropdown-border);
    }
}

.ui-timepicker-wrapper {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

ul.dropdown-menu > li.checkbox {
    margin-left: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding: 4px 0 4px 20px;

    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;

    label {
        padding-left: 23px;

        input[type="checkbox"].form-checkbox {
            margin-left: -23px;

            &.form-checkbox-small {
                margin-top: 3px;
            }
        }
    }
}

ul.dropdown-menu {
    > li > a {
        padding-top: 4px;
        padding-bottom: 4px;

        -webkit-user-select: none;
        -webkit-user-drag: none;
        -moz-user-select: none;
        user-select: none;
        line-height: @line-height-computed;

        &.active {
            background-color: @gray-lighter;
            text-decoration: none;
            outline: 0;
        }

        > .check-icon + div {
            padding-right: 26px;
        }

        span.fa-check {
            padding-top: 2px;
        }

        &.disabled {
            color: var(--text-muted-color);
        }
    }

    > li.checkbox:last-child {
        margin-bottom: 3px;
    }

    > .dropdown-header {
        user-select: none;
    }
}

ul.dropdown-menu-with-icons {
    > li {
        a {
            padding-left: 10px;
        }

        .fas, .far, .glyphicon, .empty-icon {
            width: 16px;
            text-align: center;
            display: inline-block;
        }

        .item-text {
            padding-left: 8px;
            position: static;
        }
    }
}

.btn-group.open .dropdown-toggle {
    &.btn-text {
        box-shadow: none;
    }
}

.btn.dropdown-toggle > span.fa-ellipsis-h {
    top: 1px;
    position: relative;
}

.btn.btn-sm.dropdown-toggle > span.fa-ellipsis-h {
    top: 0;
}

.btn.dropdown-toggle > span.caret.wide {
    margin-left: 2px;
    margin-right: 2px;
}

.dropdown-menu {
    .quick-search-list-item {
        input {
            border-left: 0;
            border-right: 0;
            border-radius: 0;
        }
    }
}

ul.dropdown-menu {
    > li.divider + li.divider {
        display: none;
    }

    > li.divider:not(.hidden)  + li.hidden + li.divider {
        display: none;
    }

    > li.divider:not(.hidden)  + li.hidden + li.hidden + li.divider {
        display: none;
    }

    > li.divider:not(.hidden)  + li.hidden + li.hidden + li.hidden + li.divider {
        display: none;
    }

    > li.divider:not(.hidden)  + li.hidden + li.hidden + li.hidden + li.hidden + li.divider {
        display: none;
    }

    > li.divider:not(.hidden)  + li.hidden + li.hidden + li.hidden + li.hidden + li.hidden + li.divider {
        display: none;
    }

    > li.divider:not(.hidden) + li.hidden + li.hidden + li.hidden + li.hidden + li.hidden + li.hidden + li.divider {
        display: none;
    }

    > li.hidden:first-child + li.divider {
        display: none;
    }

    > li.hidden:first-child + li.hidden + li.divider {
        display: none;
    }

    > li.hidden:first-child + li.hidden + li.hidden + li.divider {
        display: none;
    }

    > li.hidden:first-child + li.hidden + li.hidden + li.hidden + li.divider {
        display: none;
    }

    > li.hidden:first-child + li.hidden + li.hidden + li.hidden + li.hidden + li.divider {
        display: none;
    }

    > li.hidden:first-child + li.hidden + li.hidden + li.hidden + li.hidden + li.hidden + li.divider {
        display: none;
    }

    > li.divider:has(+ li.hidden:last-child) {
        display: none;
    }

    > li.divider:has(+ li.hidden + li.hidden:last-child) {
        display: none;
    }

    > li.divider:has(+ li.hidden + li.hidden + li.hidden:last-child) {
        display: none;
    }

    > li.divider:has(+ li.hidden + li.hidden + li.hidden + li.hidden:last-child) {
        display: none;
    }

    > li.divider:has(+ li.hidden + li.hidden + li.hidden + li.hidden + li.hidden:last-child) {
        display: none;
    }

    > li.divider:has(+ li.hidden + li.hidden + li.hidden + li.hidden + li.hidden + li.hidden:last-child) {
        display: none;
    }
}
